package Lesson.Student.arrayListDemo;

import java.util.ArrayList;

public class Demo1 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();

        list.add("123");
        list.add("234");
        list.add("345");
        list.add("456");
        list.add("567");

        System.out.println(list);
        System.out.println("=======================");

        list.remove("345");
        System.out.println(list);

        list.remove(2);
        System.out.println(list);
        System.out.println("=======================");

        list.set(2,"678");
        System.out.println(list);
        System.out.println("=======================");

        String s = list.get(2);
        System.out.println(s);

        int l = list.size();
        System.out.println(l);
    }
}
